# -*- coding: utf-8 -*-

from wt.connector.db_manager.db_untils_tools import DBUntilsTools
from wt.connector.data_connect import DataConnect


class DBSapHanaManager(DataConnect, DBUntilsTools):

    def __init__(self, ):
        super().__init__()

    def get_db_data(self, db, table):
        sql = "SELECT * FROM {}.{} ORDER BY ID DESC LIMIT 10".format(db, table)
        res = self.exec_saphana_sql(db, sql)
        return self.set_return_massage(res, only_data="yes")
